package com.ddyx.common.base.enums;

/**
 * 枚举redis数据库编号及key前缀
 *
 */
public enum RedisType {

	// **********通用*************
	USER_ORDER_CODE(1, "USERORDERCODE"),

	OFFLINE_MSG(2, "offmsg:"),


	// ***********用户************
	/**
	 * 用户token缓存
	 */
	USER_TOKEN(3, "user:token:"),
	/**
	 * 用户端登录验证码缓存
	 */
	USER_LOGIN_SMSCACHE(3, "user:login:sms:"),

	/**
	 * 用户注册验证码缓存
	 */
	USER_REG_SMSCACHE(3, "user:reg:sms:"),
	/**
	 * 用户忘记密码
	 */
	USER_FINDPASSWORD_SMS(3, "user:pwd:sms:"),
	/**
	 * 用户未读消息
	 */
	USER_PUSH_MSG(3, "user:msg:"),

	/**
	 * 系统消息
	 */
	SYS_PUSH_MSG(6, "sys:msg:"),

	// ***********微信************
    /**
     * 微信
     */
    USER_WX_UNIONID(4, "user:wx_unionid:"),

    /**
     * 微信ticked缓存
     */
    WX_TICKED(4,"wx:ticked"),

	/**
	 * 活跃时间
	 */
	ACTIVE_DATE(5,"us:active_date:");


	private int db;
	private String prefix;

	RedisType(int db, String prefix) {
		this.db = db;
		this.prefix = prefix;
	}

	public int getDb() {
		return db;
	}

	public String getPrefix() {
		return prefix;
	}
}
